<?php
include '../conn.php';
include 'a-cookie.php';
if($_SESSION["a-rank"]==1)
{
    die("权限不够，不能进入");
}
?>

<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>首页-管理员</title>
    <link rel="stylesheet" type="text/css" href="../css/htmleaf-demo.css">
    <link rel="stylesheet" type="text/css" href="../css/nav.css">
    <link rel="stylesheet" type="text/css" href="../fonts/iconfont.css">

    <link rel="stylesheet" href="../css/bootstrap-theme.css"/>

    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <link rel="stylesheet" href="../css/bootstrap-theme.min.css"/>
    <link rel="stylesheet" href="../css/bootstrap.css"/>
    <script type="text/javascript" src="../js/bootstrap3.0.3.min.js"></script>


    <link rel="stylesheet" type="text/css" href="../layer/theme/default/layer.css">
    <link rel="stylesheet" type="type/css" href="../layer/mobile/need/layer.css">

    <link rel="stylesheet" type="text/css" href="css/style.css">


    <style>
        #out {
            position: absolute;
            right: 30px;
            top: 20px;
            z-index: 100000;
        }

        .topx {
            margin: 0px;
            padding-top: 50px;
            position: fixed;
            z-index: 999;
            /*浮动部分*/
            /*float:left; */
        }

        .navfont {
            font-family: "黑体";
            font-size: 1.5em;
            padding-top: 10px;
        }

        .indexborder {
            border: 1px transparent;
            border-color: transparent;
            border-color: rgba(0, 0, 0, 0);
            margin-left: 285px;
            margin-right: 5%;
        }

        .bodycolor {
            background-color: gainsboro;
        }

        .box-inline {
            box-shadow: 0px 2px 2px grey;
        }

        .indexdiv1 {
            margin-top: 70px;
            margin-bottom: 20px;
            /*margin-left: 0px;*/
            padding: 2% 2% 2% 2%;
            width: 100%;
            /*height:400px;*/
        }

        .indexdiv2 {
            margin-top: 10px;
            margin-bottom: 20px;
            /*margin-left: 0px;*/
            padding: 20px 20px 10px 20px;
            width: 100%;
            /*height:400px;*/
        }

        .navbackground-a {
            background-color: #463c19;
        }

        .indexfooter {
            background-color: dimgray;
            /*height: 100px;*/
            position: relative;
            bottom: 0px;
            width: 100%;
            float: left;
        }

        .footer-p {
            padding-top: 10px;
            padding-left: 210px;
            /*text-align: center;*/
        }

        .paneldiv {
            /*margin-left: 60px;*/
            /*margin-top: 20px;*/
            padding: 5%;
            float: left;
            width: 49%;
            height: 240px;
            font-size: 0.8em;
        }

        .bannerdiv {
            width: 100%;
        }

        * {
            margin: 0px;
            padding: 0px;
        }

        ul {
            list-style: none;
        }

        a img {
            border: none;
        }

        a {
            color: #333;
            text-decoration: none;
        }

        a:hover {
            color: saddlebrown;
        }

        #news {
            border: 5px solid #ababab;
            -moz-border-radius: 15px;
            -webkit-border-radius: 15px;
            border-radius: 15px;
            box-shadow: 2px 2px 10px #ababab;
            /*margin: 10px 50px 10px 50px;*/
            /*margin-right:80px;*/
            text-align: left;
            /*浮动部分*/
            float: right;
            width: 49%;
        }

        #newsTitle {
            height: 62px;
            overflow: hidden;
            font-size: 26px;
            line-height: 62px;
            padding-left: 30px;
            border: 1px solid # #f05e6f;
            border-radius: 8px 8px 0 0;
            color: #fff;
            position: relative;
        }

        #newsTitle a {
            position: absolute;
            right: 10px;
            bottom: 10px;
            display: inline;
            color: #fff;
            font-size: 12px;
            line-height: 24px;
        }

        #newsBot {
            height: 10px;
            overflow: hidden;
        }

        #newsBox {
            height: 144px;
            /*margin-left: 10px;*/
            /*margin-right: 10px;*/
            margin-top: 10px;
            overflow: hidden;
        }

        #news ul li {
            height: 24px;
        }

        #news ul li a {
            /*浮动部分*/
            float: left;
            display: block;
            overflow: hidden;
            text-indent: 15px;
            height: 24px;
        }

        #news ul li span {
            /*浮动部分*/
            float: right;
            color: #999;
        }

        .black_overlay {
            /*  弹窗样式*/
            display: none;
            position: absolute;
            top: 0%;
            left: 0%;
            width: 100%;
            height: 100%;
            background-color: black;
            z-index: 1001;
            -moz-opacity: 0.6;
            opacity: .60;
            filter: alpha(opacity=80);
        }

        .white_content {
            display: none;
            position: absolute;
            top: 10%;
            left: 10%;
            width: 80%;
            height: 80%;
            border: 16px solid lightblue;
            background-color: white;
            z-index: 1002;
            overflow: auto;
        }

        .white_content_small {
            display: none;
            position: absolute;
            top: 40%;
            left: 30%;
            width: 40%;
            height: 50%;
            border: 16px solid lightblue;
            background-color: white;
            z-index: 1002;
            overflow: auto;
        }

        .tablediv {
            float: left;
            width: 100%;
        }

        @media screen and (max-width: 900px) {
            #nav {
                width: 25%;
            }

            #news {
                width: 100%;
                font-size: 70%;
            }

            .paneldiv {
                width: 100%;
                font-size: 90%;
            }

            .indexborder {
                margin-left: 35%;
                margin-right: 5%;
            }

            .footer-p {
                padding-left: 26%;
            }
        }




    </style>

</head>

<body class="bodycolor">

<nav class="navbar navbar-default navbar-fixed-top" style="clear: left;">
    <div class="container">
        <div class="navbar-right navfont" id="navbar-collapse">
            <p>华软网络技术系毕业管理系统</p>
        </div>
        <a href="a-cookie.php?cookie=out" id="out">退出</a>
    </div>

</nav>

<div class="nav topx navbackground-a" id="nav">
    <div>

        <div style="border-bottom:1px solid rgba(255,255,255,.1)"><img src="../images/mini.png"></div>
    </div>
    <ul>
        <li class="nav-item">
            <a href="a-index.php"><i class="my-icon nav-icon icon_2"></i><span>首页</span><i class="my-icon nav-more"></i></a>

        </li>
        <li class="nav-item">
            <a href="a-newsManage.php"><i class="my-icon nav-icon icon_5"></i><span>开放/新闻管理</span><i
                    class="my-icon nav-more"></i></a>
        </li>


        <li class="nav-item">
            <a href="a-all.php"><i class="my-icon nav-icon icon_6"></i><span>答辩汇总</span><i class="my-icon nav-more"></i></a>

        </li>
        <li class="nav-item">
            <a href="#"><i class="my-icon nav-icon icon_3"></i><span>答辩分组</span><i class="my-icon nav-more"></i></a>
            <ul>
                <li>
                    <a href="a-denfenAsign.php"><span>小组分配</span></a>
                </li>
                <li>
                    <a href="a-denfenInterAsign.php"><span>组内分配</span></a>
                </li>
            </ul>
        </li>
        <li class="nav-item">
            <a href="#"><i class="my-icon nav-icon icon_5"></i><span>资料管理</span><i class="my-icon nav-more"></i></a>
            <ul>
                <li>
                    <a href="a-sInfromationmange.php"><span>学生资料管理</span></a>
                </li>
                <li>
                    <a href="a-tInfromationmange.php"><span>教师资料管理</span></a>
                </li>
            </ul>
        </li>
    </ul>
</div>

<div class="indexborder">
    <center style="margin-left: 0px;">
        <div class="box-inline indexdiv1 panel panel-default auto" align="center">
            <div class="panel panel-primary panel-success">
                <div class="panel-heading" style="padding: 0px;color: black;font-style:initial;">
                    <h3 class="panel-title " style="background-color: #807345;padding: 15px;color: whitesmoke;">
                        答辩分组管理</h3>
                </div>

                <table class="table  table-hover  table-striped  table-condensed">
                    <thead>
                    <tr class="thcolor">
                        <th>组编号</th>
                        <th>组长</th>
                        <th>答辩时间</th>
                        <th>答辩地点</th>
                        <th>教师成员</th>
                        <th>学生成员</th>
                        <th>操作</th>


                    </tr>
                    </thead>
                    <tbody>

                    <?php
                    include '../conn.php';
                    include 'function.php';
                    $sql = "select GroupId,groupAd,defenPoint,defenTime from defenseteam";
                    $result = $conn->query($sql);
                    while ($row = $result->fetch_assoc()) {
                        ?>


                        <tr>
                            <td><?= $row["GroupId"] ?></td>
                            <td><?= $row["groupAd"] ?></td>
                            <td><?= $row["defenTime"] ?></td>
                            <td><?= $row["defenPoint"] ?></td>
                            <td><?php getTeacher($row["GroupId"], $conn); ?></td>
                            <td style="width: 20%"><?php getStudent($row["GroupId"], $conn); ?></td>
                            <td style="width:7%"><input type="button" value="修改" class=" btn-xs "
                                                        style="background-color: #463c19;color: white;"
                                                        onclick="window.location.href='defenteamUpdate.php?groupId=<?= $row["GroupId"] ?>'">
                                <input type="button" value="删除" class=" btn-xs "
                                       style="background-color: #463c19;color: white;"
                                       onclick="defenDelete(this,<?= $row["GroupId"] ?>)">
                            </td>

                        </tr>

                    <?php
                    }
                    ?>
                    </tbody>
                </table>

                <div class="panel-body">
                    <input type="button" value="添加答辩组" class="btn btn-primary btn-success"
                           style="background-color:#463c19 " onclick="window.location.href='defenteamAdd.html'">
                    <br><br><br><br><br><br><br><br>
                </div>


            </div>

            <br>


        </div>


</div>
</div>
</center>

</div>


<footer class="indexfooter container-fluid  bottom">
    <!--  <p class="footer-p" align="center">地址：广东省广州市从化区经济开发区高技术产业园广从南路548号 | 电话：020－87818918 邮编：510990 | 网站公安备案编号：4401840100050 粤ICP备：05085382号 站长统计</p>-->
</footer>


<script>
    window.jQuery || document.write('<script src="../js/jquery-1.11.0.min.js"><\/script>')
</script>
<script type="text/javascript" src="../js/nav.js"></script>
//弹窗实现js

<script>
    function defenDelete(t, id) {
        var msg = "您真的确定要删除吗？\n\n请确认！";
        if (window.confirm(msg) == true) {
            $.post("a-groupProcess.php", {
                actionType: "denfenDelete",
                groupId: id
            }, function (data) {

                if (data == 1) {
                    t.parentNode.parentNode.remove();

                }

            });
        } else {

        }
    }


</script>


</body>

</html>